﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:s="clr-namespace:DiagramDesigner"
                    xmlns:c="clr-namespace:DiagramDesigner.Controls">

  <RadialGradientBrush x:Key="RadialBrushOrange" Center="0.2, 0.2" GradientOrigin="0.2, 0.2" RadiusX="0.8" RadiusY="0.8">
    <GradientStop Color="White" Offset="0"/>
    <GradientStop Color="Orange" Offset="0.9"/>
  </RadialGradientBrush>

  <RadialGradientBrush x:Key="RadialBrushGreen" Center="0.2, 0.2" GradientOrigin="0.2, 0.2" RadiusX="0.8" RadiusY="0.8">
    <GradientStop Color="White" Offset="0"/>
    <GradientStop Color="Green" Offset="0.9"/>
  </RadialGradientBrush>

  <RadialGradientBrush x:Key="RadialBrushBlue" Center="0.2, 0.2" GradientOrigin="0.2, 0.2" RadiusX="0.8" RadiusY="0.8">
    <GradientStop Color="White" Offset="0"/>
    <GradientStop Color="Blue" Offset="0.9"/>
  </RadialGradientBrush>
  
  <LinearGradientBrush x:Key="Brush6" StartPoint="0,0" EndPoint="0,1" Opacity="1">
    <LinearGradientBrush.GradientStops>
      <GradientStop Color="#FAFBE9" Offset="0.1" />
      <GradientStop Color="Orange" Offset="1" />
    </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>

  <s:Toolbox x:Key="ShapeStencils" ItemSize="60,60">
    <ItemsControl.Items>

      <Ellipse Fill="{StaticResource RadialBrushOrange}" ToolTip="Ellipse" IsHitTestVisible="false">
        <Ellipse.BitmapEffect>
          <DropShadowBitmapEffect Color="Gray" Direction="315" ShadowDepth="15" Softness="0.8" Opacity="0.4"/>
        </Ellipse.BitmapEffect>
      </Ellipse>

      <Ellipse Fill="{StaticResource RadialBrushBlue}" ToolTip="Ellipse" IsHitTestVisible="false">
        <Ellipse.BitmapEffect>
          <DropShadowBitmapEffect Color="Gray" Direction="315" ShadowDepth="15" Softness="0.8" Opacity="0.4"/>
        </Ellipse.BitmapEffect>
      </Ellipse>

      <Ellipse Fill="{StaticResource RadialBrushGreen}" ToolTip="Ellipse" IsHitTestVisible="false">
        <Ellipse.BitmapEffect>
          <DropShadowBitmapEffect Color="Gray" Direction="315" ShadowDepth="15" Softness="0.8" Opacity="0.4"/>
        </Ellipse.BitmapEffect>
      </Ellipse>

      <Path Stretch="Fill" IsHitTestVisible="false"
            StrokeLineJoin="Round"
            Fill="{StaticResource Brush6}"
            Stroke="#AAFF8C00"
            StrokeThickness="3"
            Data="M 9,2 11,7 17,7 12,10 14,15 9,12 4,15 6,10 1,7 7,7 Z">
        <s:DesignerItem.DragThumbTemplate>
          <ControlTemplate>
            <Path Fill="Transparent" Stretch="Fill" Data="M 9,2 11,7 17,7 12,10 14,15 9,12 4,15 6,10 1,7 7,7 Z"/>
          </ControlTemplate>
        </s:DesignerItem.DragThumbTemplate>
        <s:DesignerItem.ConnectorDecoratorTemplate>
          <ControlTemplate>
            <c:RelativePositionPanel Margin="-4">
              <s:Connector Orientation="Top" c:RelativePositionPanel.RelativePosition="0.5,0"/>
              <s:Connector Orientation="Left" c:RelativePositionPanel.RelativePosition="0,0.385"/>
              <s:Connector Orientation="Right" c:RelativePositionPanel.RelativePosition="1,0.385"/>
              <s:Connector Orientation="Bottom" c:RelativePositionPanel.RelativePosition="0.185,1"/>
              <s:Connector Orientation="Bottom" c:RelativePositionPanel.RelativePosition="0.815,1"/>
            </c:RelativePositionPanel>
          </ControlTemplate>
        </s:DesignerItem.ConnectorDecoratorTemplate>
      </Path>
      
    </ItemsControl.Items>
  </s:Toolbox>     
</ResourceDictionary>